Handle rule filter serialization#469
Merged
Merged
Conversation
e3da66a to
b8a38fc
Compare
d5fe2f5 to
3bf7acb
Compare
nilmerg
reviewed
May 12, 2026
nilmerg
requested changes
May 13, 2026
Member
nilmerg
left a comment
There was a problem hiding this comment.
Didn't look at the controller or suggestions yet.
015bfb8 to
d8a98b8
Compare
nilmerg
requested changes
May 19, 2026
nilmerg
reviewed
May 19, 2026
nilmerg
requested changes
May 19, 2026
nilmerg
reviewed
May 19, 2026
nilmerg
requested changes
May 20, 2026
Member
nilmerg
left a comment
There was a problem hiding this comment.
please add a unit test for the source hook locator and the rule serializer.
nilmerg
reviewed
May 20, 2026
nilmerg
requested changes
May 21, 2026
nilmerg
previously approved these changes
May 21, 2026
Member
nilmerg
left a comment
There was a problem hiding this comment.
Fine for now. Let's see if we get Icinga/ipl-web#381 through before merging.
9e4dfbd to
b564433
Compare
nilmerg
requested changes
May 22, 2026
nilmerg
reviewed
May 22, 2026
Allow serializing rules as JSON by providing a filter and the JsonPaths for all used columns.
Introduce a new version of the `SourceHook` interface for V 1.0, which contains all necessary funtions to ensure SearchEditors for rules can be set up by notifications-web, and their filters can be serialized in the way the daemon expects them.
`SourceHookLocator::forType()` is used to get the SourceHook of the given type. This allows `SourceForm` to accept text input for the source type.
Adjust the controller to rely on the new `V2\SourceHook` interface, to set up the filter editor and serialize it's filter.
1fb39c8 to
a4e2aa2
Compare
nilmerg
approved these changes
May 22, 2026
nilmerg
added a commit
to Icinga/icingadb-web
that referenced
this pull request
May 22, 2026
This PR adds a new `V2/Icinga2Source` hook implementation to integrate with the `V2/SourceHook` interface from `icinga-notifications-web`. ### Supporting changes required by the hook: - Introduce `QueryValuesProvider` — Decouples value suggestion logic from `ObjectSuggestions` into a standalone Generator-based class. This allows the hook's `getValueSuggestions()` to reuse the same suggestion infrastructure without a `Suggestions` context. - `QueryColumnsProvider`: Add `setShowRelationLabels()` setter — Exposes the relation label display option so the hook can control it. - `QueryColumnsProvider`: Make `collectFilterColumns()` protected — No longer needs to be public; the override in `SearchControls` that called it statically is removed as the optimization it provided is no longer necessary. - `ObjectSuggestions`: Remove label-to-path resolution for columns with spaces to ensure consistency between the suggestions in the search bar and suggestions provided by the `Icinga2Source`. resolves: #1365 ### Requires: - Icinga/icinga-notifications-web#469 - #1375 - Icinga/ipl-orm#161
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolve #466
Introduce
RuleSerializerto create Json from a configured filter.Introduce
Icinga\Module\Notifications\Hook\V2which no longer requiresserializeRuleFilter()andgetRuleFilterTargets()as they are now obsolete.Adjust
EventRuleControllerto skip target selection use the newRuleSerializer.require Icinga/ipl-web#380
require Icinga/ipl-web#383
require Icinga/ipl-stdlib#75
require Icinga/ipl-stdlib#76